﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yun.Interface;
using Yun.Marketing.Response;

namespace Yun.Marketing.Request
{ 
    /// <summary>
    /// 获取商品专题列表
    /// yun.goods.subject.list.get
    /// </summary>
    public class GetSubjectListRequest : ITopRequest<GetSubjectListResponse>
    {
        public string GetApiName()
        {
            return "yun.goods.subject.list.get";
        }


        /// <summary>
        /// 页码
        /// </summary>
        public int PageNum
        {
            get { return _pageNum; }
            set
            {
                _pageNum = value < 1 ? 1 : value;
            }
        }

        private int _pageNum = 1;

        /// <summary>
        /// 页容量
        /// </summary>
        public int PageSize
        {
            get { return _pageSize; }
            set
            {
                _pageSize = value < 1 ? 1 : value;
            }
        }

        private int _pageSize = 1;

        /// <summary>
        /// 专题ID
        /// </summary>
        public long? SubjectId { get; set; }

        /// <summary>
        /// 专题名称
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 活动开始时间
        /// </summary>
        public string StartTime { get; set; }

        /// <summary>
        /// 活动结束时间
        /// </summary>
        public string EndTime { get; set; }

        /// <summary>
        /// 自定义推荐
        /// </summary>
        public int? Recommend { get; set; }

        /// <summary>
        /// 公司ID
        /// </summary>
        public int? CompanyId { get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        public int? ShopId { get; set; }

        /// <summary>
        /// 状态，OVER（结束），DOING（进行中），PROPARE（未开始），ALL（全部）
        /// </summary>
        public string Status { get; set; }

        public void Validate()
        {
             
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"pagenum", PageNum},
                {"pagesize", PageSize},
                {"subjectid", SubjectId},
                {"title", Title},
                {"starttime", StartTime},
                {"endtime", EndTime},
                {"recommend", Recommend},
                {"companyid", CompanyId},
                {"shopid", ShopId},
                {"status", Status}

            };
            return parameters;
        }


    }
}
